/**
 * May 15, 2014 10:12:31 AM
 */
package elitech.vietnam.copyweatherfashion.widget;

import elitech.vietnam.copyweatherfashion.R;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.Button;

/**
 * @author Cong
 *
 */
public class ButtonFriend extends Button {
	
	public ButtonFriend(Context context) {
		super(context);
	}
	
	public ButtonFriend(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	public ButtonFriend(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public void setStatus(boolean status) {
		if (status) {
			setBackgroundResource(R.drawable.button_friend_p);
			setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(R.drawable.button_friend_icon_p), null, null, null);
			setTextColor(getResources().getColor(R.color.color_lightbutton_p));
		} else {
			setBackgroundResource(R.drawable.button_friend_d);
			setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(R.drawable.button_friend_icon_d), null, null, null);
			setTextColor(getResources().getColor(R.color.color_lightbutton_d));
		}
		setEnabled(!status);
	}
}
